package com.ruoyi.system.service;

import java.util.List;
import java.util.Map;

import com.ruoyi.system.domain.HatchetAgent;
import com.ruoyi.system.domain.HatchetSystemDepartment;
import com.ruoyi.system.vo.AgentMerchantChangeVo;

/**
 * 代理商 服务层
 * 
 * @author ruoyi
 * @date 2019-02-15
 */
public interface IHatchetAgentService 
{
	/**
     * 查询代理商信息
     * 
     * @param iD 代理商ID
     * @return 代理商信息
     */
	public HatchetAgent selectHatchetAgentById(String iD);
	
	/**
     * 查询代理商列表
     * 
     * @param hatchetAgent 代理商信息
     * @return 代理商集合
     */
	public List<HatchetAgent> selectHatchetAgentList(HatchetAgent hatchetAgent);
	
	/**
     * 新增代理商
     * 
     * @param hatchetAgent 代理商信息
     * @return 结果
     */
	public int insertHatchetAgent(HatchetAgent hatchetAgent);
	
	/**
     * 修改代理商
     * 
     * @param hatchetAgent 代理商信息
     * @return 结果
     */
	public int updateHatchetAgent(HatchetAgent hatchetAgent);
		
	/**
     * 删除代理商信息
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	public int deleteHatchetAgentByIds(String ids);
	
	/**
	 * 根据agentNo 获取代理商信息
	 * @param loginName
	 * @return
	 */
	public HatchetAgent selectHatchetAgentByNo(String agentNo);
	/**
	 * 根据代理商名称或编号查询数据
	 * @param agent
	 * @return
	 */
	public List<HatchetAgent> selectHatchetAgentByaction(HatchetAgent hatchetAgent);
	
	/**
	 * 查询树结构代理商
	 * @param parentId 代理商的id
	 * @return
	 */
	public List<HatchetAgent> selectHatchetAgentTree(HatchetAgent hatchetAgent);
	
	/**
	 * 查询直接下属代理商财务信息
	 * @param hatchetAgent 
	 * @return
	 */
	public List<AgentMerchantChangeVo> selectUnderAgentMoneyForDLS(HatchetAgent hatchetAgent);

	public String getCurLvlCode(HatchetAgent hatchetAgent);

	public String spiltAgentCodeNo(HatchetAgent hatchetAgent);

	public HatchetSystemDepartment insertSystemDeployMentByAgent(HatchetAgent hatchetAgent);

	public String splitAgentCodeLower(String departmentCode);
	
	/**
	 * 修改代理商禁用状态
	 * @param agentId
	 * @param logoText
	 * @return
	 */
	public Map<String, Object> changeStatus(String agentId, String logoText);

	public Map<String, Object> addAgent(HatchetAgent hatchetAgent);

	public List<HatchetAgent> selectAllAgent();

}
